/*
 * This file is part of connotea-java.
 *
 * connotea-java is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * connotea-java is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

package org.connotea;

import org.w3c.dom.Document;

/**
 * A response bean.
 */
public class Response {

    private Document document;

    private int status;

    /**
     * Instantiate with the status.
     * 
     * @param status the HTTP status code
     */
    public Response(int status) {
        this(status, null);
    }

    /**
     * Instantiate with the status and the response XML.
     * 
     * @param status the status
     * @param document the response XML
     */
    public Response(int status, Document document) {
        this.status = status;
        this.document = document;
    }

    /**
     * Returns the document.
     * 
     * @return the document
     */
    public Document getDocument() {
        return document;
    }

    /**
     * Sets the document.
     * 
     * @param document the document to set
     */
    public void setDocument(Document document) {
        this.document = document;
    }

    /**
     * Returns the status.
     * 
     * @return the status
     */
    public int getStatus() {
        return status;
    }

    /**
     * Sets the status.
     * 
     * @param status the status to set
     */
    public void setStatus(int status) {
        this.status = status;
    }
}
